Update gen-2 default alignment matrices to match revised firmware seed - #74
Merged
Conversation
LSM6DSV accel/gyro: [0,-1,0, 0,0,1, -1,0,0] -> [0,1,0, 0,0,1, 1,0,0] LIS2MDL mag: [0,1,0, 0,0,1, -1,0,0] -> [1,0,0, 0,0,1, 0,1,0] LIS2DW12 unchanged. Determinant/third-column invariants still hold (accel/gyro proper rotations, mag left-handed, chip +Z -> common +Y). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Updates the gen-2 (Verisense) default sensor→ASM alignment matrices so host-side defaults match the revised firmware calibration seed, and adjusts the corresponding pinned expectation in the default-seed round-trip test.
Changes:
- Updated gen-2 default alignment matrices for LSM6DSV accel/gyro and LIS2MDL mag in
calibrationDefaults.ts. - Updated the default-seed test assertion for the LSM6DSV accel alignment in
calibrationDefaults.test.ts.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/verisense/calibrationDefaults.test.ts | Updates the pinned expected alignment for the gen-2 default seed serialization round-trip. |
| src/devices/verisense/calibrationDefaults.ts | Updates the gen-2 default alignment matrices returned/seeded for LSM6DSV accel/gyro and LIS2MDL mag. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Addresses Copilot review: the seed round-trip test only pinned the LSM6DSV accel alignment, so drift in the gyro / LIS2DW12 / LIS2MDL defaults would not have been caught. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
JongChern
approved these changes
Jul 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Updates the gen-2 (LSM6DSV/LIS2MDL) default sensor→ASM alignment matrices in
calibrationDefaults.tsto match the revised firmware calibration seed (as read back from a device: calibration version 0xD7C8, 14 blocks):The existing invariants still hold: accel/gyro are proper rotations (det +1), the LIS2MDL frame remains left-handed (det −1), and every sensor's chip +Z maps to common +Y.
Testing
npm test— 241/241 pass (pinned default-set expectation updated).getVerisenseCalibrationSensors()returns the new matrices.🤖 Generated with Claude Code